package com.uzai.common.enums;

/**
 * 用户黑名单类型
 * @Auther: liuqi
 * @Date: 2021/8/30 11:10
 * @Description:
 */
public enum TakeBalTypeEnum {
    //0手动提现  1自动提现 2自动失败转手动
    HANDER(0,"手动提现 "),
    AUTO(1,"自动提现"),
    AUTO_FAILE_HANDER(2,"自动失败转手动");

    private Integer value;
    private String desc;

    TakeBalTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static TakeBalTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (TakeBalTypeEnum type: TakeBalTypeEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
